{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">用户名称</label>
        <div class="layui-input-block">
            <input id="c-uid" lay-verify="required" readonly="" class=" layui-input"  type="text"
                   value="{$data.staff.username}">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">加入理由</label>
        <div class="layui-input-block">
            <input id="c-add_reason" class=" layui-input" name="row[add_reason]" type="text" value="{$data.add_reason}">
        </div>
    </div>


    <div class="layui-form-item" onclick="showReason()">
        <label class="layui-form-label">加入理由</label>
        <input type="radio" name="row[status]" checked value="1" title="通过">
        <input type="radio" name="row[status]" value="2" title="不通过">
    </div>

    <div class="layui-form-item" style="display: none" id="reasonShow">
        <label class="layui-form-label">不通过的原因</label>
        <div class="layui-input-block">
            <input id="c-no_reason" class=" layui-input" name="row[no_reason]" type="text" value="">
        </div>
    </div>
    


    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use('yznForm', function () {
        var yznForm = layui.yznForm;
        yznForm.bindevent($("form.layui-form"));
    });

    function showReason() {
        var status = $("input[name='row[status]']:checked").val()
        if (status == 1) {
            $('#reasonShow').hide()
            $('#reason').val('')
        } else {
            $('#reasonShow').show()
        }

    }

</script>
{/block}